package gptma.bo.dao.querier;

import java.util.List;

/**
 * Query API for multiple entities.
 * 
 * @param T
 *            entity type
 * @author xcl
 * 
 */
public interface GenericQuerier<T> {

	/**
	 * Return the list of T objects that match given set of criteria. If
	 * criteria set is empty, every T object of the database will be returned,
	 * so use this method with caution
	 * 
	 * @param criterionSet
	 *            initialised criterionSet instance
	 * @return matching T objects
	 * @throws QuerierException
	 *             if an error occurs
	 */
	List<T> findByCriteria(CriterionSet criterionSet) throws QuerierException;
}
